import request from '@/utils/myrequest'

// 初始化列表
function getList(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetList',
    method: 'get',
    kvs
  })
}
// 获取详情
function getEditForm(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetEditForm',
    method: 'get',
    kvs
  })
}
// 项目分类下拉框
function getCategoryList(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetCategoryList',
    method: 'get',
    kvs
  })
}
// 表单类型下拉框
function getFormTypeList(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetFormTypeList',
    method: 'get',
    kvs
  })
}
// 新增
function doAdd(kvs) {
  return request({
    url: '/config/EFormFormCheck/Add',
    method: 'POST',
    kvs
  })
}
// 删除
function doDelete(kvs) {
  return request({
    url: '/config/EFormFormCheck/Delete',
    method: 'POST',
    kvs
  })
}
// 表单编辑时获取当前表单下绑定的表单项
function getItemList(kvs) {
  return request({
    url: '/config/EFormItemCheck/GetItemList',
    method: 'get',
    kvs
  })
}
// 编辑更新
function doUpdate(kvs) {
  return request({
    url: '/config/EFormFormCheck/Update',
    method: 'POST',
    kvs
  })
}
// 根据项目分类获取表单名称list
export function getFormList(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetFormList',
    method: 'get',
    kvs
  })
}
// 检查表单下拉框
export function getPMFormList(kvs) {
  return request({
    url: '/config/EFormFormCheck/GetPMFormList',
    method: 'get',
    kvs
  })
}
export default{
  getList, getCategoryList, getFormTypeList, doAdd, doDelete,
  getItemList, getEditForm, doUpdate, getFormList
}
